package com.qf.feigndemo.exhandler;

import com.qf.common.vo.ResultVo;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * 全局异常处理器
 */
@RestControllerAdvice
public class GlobalExHandler {

    @ExceptionHandler(Exception.class)
    public ResultVo handlEx(Exception e){
        e.printStackTrace();
        return new ResultVo(-1, "error", e.getMessage());
    }

}
